package com.ch.service.impl;

import com.ch.dao.StudentDao;
import com.ch.domain.Student;
import com.ch.service.StudentService;

import java.util.List;

/**
 * @author chenhong
 * @version 1.0.0
 * @ClassName StudentServiceImpl.java
 * @Description TODO
 * @createTime 2020年12月13日 10:41:00
 */
public class StudentServiceImpl implements StudentService {

    //引用类型Dao
    private StudentDao studentDao;

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public int addStudent(Student student) {
        int nums = studentDao.insertStudent(student);
        return nums;
    }

    @Override
    public List<Student> selectStudents() {
        return studentDao.selectStudents();
    }
}
